<?
/*
 * Copyright 2004-2005 Sigve Indregard.
 *
 * This file is part of Laivsys.
 *
 * Laivsys is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * Laivsys is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with Laivsys; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */

/*
 * $Id: postlaiv.php 6 2005-07-11 23:14:47Z say $
 */
 
include_once("db.php");
include_once("laivid.php");
include_once("design.php");

$arr=getLaiv();
$arrid=$arr['ID'];
$sidetittel=$arr['Tittel']." - Postlaiv";
include("top.php");

if (time() > strtotime($arr['Roller_release'])) {
	//roller-release er passert
	$sql = "SELECT * FROM r_Rolle WHERE LaivID=$arrid";
	$roller = mysql_query($sql);

	headline("Roller");
	if (mysql_num_rows($roller)) {
		text("<a href=\"roller.php\">Vis roller</a>");
	} else
		text("Rollebeskrivelsene for denne laiven er ikke lagt inn.");

	
	$sql = "SELECT ID FROM Bilder WHERE LaivID=$arrid";
	$bilder = mysql_query($sql);

	headline("Bilder");
	if (mysql_num_rows($bilder)) 
		text("<a href=\"bilder.php\">Bilder fra laiven</a>");
	else
		text("Ingen bilder fra denne laiven.");
} else {
	headline("Postlaiv");
	text("Her vil det etterhvert dukke opp bilder og rollebeskrivelser fra laiven.\nDette skjer den ".isodateformat($arr['Roller_release']).".");
}

include("bottom.php");
?>
